<?php
//http://localhost/gucci/1908php3/goodsaddress.php
//http://localhost/gucci/1908php3/goodsaddress.php?userid=10&usertel=13523328177&chenghu=11&xing=11&ming=11&sheng=11&shi=11&qu=11&xiangxidizhi=11
@require_once("toubu.php");
$userid=$_GET["userid"];
$usertel=$_GET["usertel"];
$chenghu=$_GET["chenghu"];
$sheng=$_GET["sheng"];
$shi=$_GET["shi"];
$qu=$_GET["qu"];
$xiangxidizhi=$_GET["xiangxidizhi"];

$str="INSERT INTO gucciaddress (userid,usertel,chenghu,sheng,shi,qu,xiangxidizhi) VALUES ('$userid','$usertel','$chenghu','$sheng','$shi','$qu','$xiangxidizhi')";
mysql_query($str);
$count  = mysql_affected_rows();
if($count>0){
    $obj["code"]=1;
    $obj["msg"]="加入成功";
}else{
    $obj["code"]=0;
    $obj["msg"]="加入失败";
}
echo json_encode($obj);
?>